1. Field of the Invention
The present invention generally relates to an image processing apparatus and an image processing method that compress and decompress an image, and more particularly relates to an image processing apparatus and an image processing method that can flexibly control the speed of image compression and decompression.
2. Description of the Related Art
JPEG 2000 is a new image compression standard having advanced functions. However, because of its advanced functions, its processing work load is high. This problem is especially serious when processing video data in real time.
Japanese Patent Application Publication No. 2002-325257 discloses a technology for decoding in real time video data compressed using JPEG 2000. In this decoding technology, first the luminance Y of a frame is decoded, next the chrominance Cb is decoded, and finally the chrominance Cr is decoded. In the decoding process, the processing time for each component in a frame is monitored and, when the processing time exceeds a time limit, the inverse wavelet transform is cancelled and “simplified processing” is performed to finish decoding the frame within a specified period of time and thereby to avoid dropping frames.
In Japanese Patent Application Publication No. 2002-325257, an example of “simplified processing” is described as follows: When the time limit is exceeded during the processing of a subband (for example, an LH subband), the coefficients in the remaining unprocessed subbands (for example, LH, HL, and HH subbands) are replaced with “0” (nullified). When the time limit is exceeded during the processing of a subband and even the processing of the LL subband is not completed, the processing of the low-order bit-planes of the LL subband is skipped and the coefficients in the LH, HL, and HH subbands are nullified.
However, nullifying subband coefficients and skipping the processing of low-order bit-planes (discarding the low-order bit-planes) in the inverse wavelet transform step as described above may not be enough to improve the processing speed and to reduce the processing work load. Also, since the conventional technology described above controls the decoding process based on the elapsed time, it cannot be used to control the processing speed and the processing work load according to user instructions, characteristics of an image, header information, or the like.